package handler

import "ucenter-api/internal/svc"

func RegisterHandlers(r *Routers, serverCtx *svc.ServiceContext) {
	login := NewLoginHandler(serverCtx)
	loginGroup := r.Group()
	// http://127.0.0.1/api/user/wxLogin/wxLogin/0a34eTll2hzKxe4OSrol2EZiDK04eTlQ
	// http://127.0.0.1/api/user/wxLogin/wxLogin/the%20code%20is%20a%20mock%20one
	loginGroup.Get("/api/user/:code", login.WechatLogin)
	loginGroup.Get("/api/user/wxLogin/getUserInfo", login.GetUserInfo)
	loginGroup.Post("/api/user/wxLogin/updateUser", login.UpdateUser)
	// loginGroup.Post("/uc/check/login", login.CheckLogin)
	loginGroup.Get("/api/user/userInfo/isSubscribe/:albumId", login.IsSubscribe)
	loginGroup.Get("/api/user/vipServiceConfig/findAll", login.FindAll)
	loginGroup.Get("/api/user/userInfo/collect/:trackId", login.Collect)
	loginGroup.Get("/api/user/userInfo/isCollect/:trackId", login.isCollect)
	loginGroup.Get("/api/user/account/userAccount/getAvailableAmount", login.GetAvailableAmount)
}
